#ifndef QTREENODE_H
#define QTREENODE_H

#include <QVariant>
#include <QList>
#include <QAbstractTreeNode.h>
#include <QIcon>

class QStandardTreeNode : public QAbstractTreeNode
{
private:
	QList<QVariant> m_data;
    Qt::ItemFlags m_flags;
    QIcon icon;
    QList<QVariant> m_userData;

public:
	QStandardTreeNode(const QList<QVariant> &data, QAbstractTreeNode* parent = 0);
    QStandardTreeNode(const QString& data, QAbstractTreeNode* parent = 0);
	~QStandardTreeNode();

	int columnCount() const;
	bool insertColumns(int position, int count);
	bool removeColumns(int position, int count);
    QVariant data(int column, int role) const;
    bool setData(QVariant data, int column, int role);

	void setFlags(Qt::ItemFlags flags);
	Qt::ItemFlags flags() const;

    void setIcon(QIcon icon) { this->icon = icon; }

};

#endif // QTREENODE_H
